package com.example.autoconfig.app.jdbc.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import lombok.Data;

/**
 * 分库
 */
@Data
@Entity
@Table(name = "T_ORDER")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true, value = { "hibernateLazyInitializer", "handler" })
public class OrderEntity {
    @Id
    @Column(name = "ID")
    @GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.example.autoconfig.app.jdbc.config.IdGenerator")
    private Long id;

    @Column(name = "ORDER_NO")
    private String orderNo;

    @Column(name = "CLIENT_ID")
    private Long clientId;

    @Column(name = "ADDRESS")
    private String address;

    @Column(name = "CREATE_TIME")
    private Long createTime;

    @Column(name = "STATE")
    private String state;

}
